Open
Conversation
added 30 commits
April 20, 2020 18:29
…state animations to be set
added 7 commits
July 24, 2020 15:10
# Conflicts: # src/resources/container.js # src/resources/parser/glb-parser.js
# Conflicts: # src/resources/parser/glb-parser.js
# Conflicts: # src/framework/components/anim/controller.js
# Conflicts: # src/resources/parser/glb-parser.js
aidinabedi
reviewed
Aug 20, 2020
aidinabedi
reviewed
Aug 20, 2020
aidinabedi
reviewed
Aug 20, 2020
aidinabedi
reviewed
Aug 20, 2020
aidinabedi
reviewed
Aug 23, 2020
aidinabedi
reviewed
Aug 23, 2020
aidinabedi
reviewed
Aug 23, 2020
godiagonal
commented
Aug 25, 2020
added 10 commits
August 25, 2020 11:47
…sByNode and _nodeModels to modelByNode
# Conflicts: # src/resources/container.js # src/resources/parser/glb-parser.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
pc.ContainerResource.scenes,pc.ContainerResource.sceneandpc.ContainerResource.nodes.pc.Entityhierarchies.scenesandsceneprops of the glTF are used to create the exported scenes.preprocess,processandpostprocess.meshinstead of just one per glTF.pc.ModelComponentis automatically added to all nodes referencing a mesh.pc.ContainerResource.models, a list ofpc.Modelassets per glTF mesh. Useful if using glTF extensions thatreference meshes.
pc.ContainerResource.scenes.model.pc.CameraComponentis automatically added to all nodes referencing a camera.pc.ContainerResource.cameras, a list of allpc.CameraComponentinstances. Does not match index of the glTFcamerasarray.preprocess,processandpostprocess.KHR_lights_punctualpc.LightComponentis automatically added to all nodes with extensionKHR_lights_punctual.pc.ContainerResource.lights, a list of allpc.LightComponentinstances. Does not match index of the glTFlightsarray.preprocess,processandpostprocess.pc.ContainerResource.animationIndicesByNode, a mapping of animation indices to nodes. This can be used to add an animation component of choice (pc.AnimComponentorpc.AnimationComponent) to nodes that should be animated. The animations must be assigned to the referenced nodes to work, since the animation tracks use relative paths to target child nodes.pc.ContainerResource.Rationale
Exporting scenes rather than a model better correspond to the glTF 2.0 spec which treats glTF as a scene format. It makes it possible to populate the scene with models, cameras, lights etc in the parser.
Other changes
For the new GLB parser implementation to work I also had to make the following changes.
pc.Model.clone()so that references to external bones (nodes outside the internal model graph) of skin instances are kept in the cloned model.Test instructions
Launch this project using a custom build of the engine from this branch. Use this launch url.
The project showcases a glTF asset containing a single scene with animations, cameras and lights being loaded by this version of the GLB parser.